package Data;

import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.simpleframework.xml.Element;
import org.simpleframework.xml.Namespace;
import org.simpleframework.xml.NamespaceList;
import org.simpleframework.xml.Root;

@Root(name = "AddDealRequest")
@NamespaceList({
    @Namespace(reference = "http://www.w3.org/2001/XMLSchema-instance", prefix = "xsi"),
    @Namespace(reference = "http://www.w3.org/2001/XMLSchema", prefix = "xsd"),
    @Namespace(reference = "http://thedealmap.com/api")
})
public class ProposedDeal {

    private NumberFormat format = new DecimalFormat("+0.0############;-0.0#############");
    private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
    @Element(required = false)
    private String ID = "";
    @Element(required = false)
    private String Title = "";
    @Element(required = false)
    private String Details = "";
    @Element(required = false)
    private String Restrictions = "";
    private Date EffectiveDate = new Date();
    @Element(name = "EffectiveDate", required = false)
    private String effectiveDate = sdf.format(EffectiveDate);
    private Date ExpirationDate = new Date();
    @Element(name = "ExpirationDate", required = false)
    private String expirationDate = sdf.format(ExpirationDate);
    @Element(required = false)
    private String Url = "";
    @Element(required = false)
    private int IsExclusive = 0;
    @Element(required = false)
    private String FirstName = "";
    @Element(required = false)
    private String LastName = "";
    @Element(required = false)
    private boolean IsOwner = false;
    @Element(required = false)
    private String AddedBy = "";
    @Element(required = false)
    private String SocialNetworkID = "";
    @Element(required = false)
    private boolean DailDealsEmailOK = false;
    @Element(required = false)
    private String StreetAddress = "";
    private double Latitude = 0;
    @Element(required = false)
    private String latitude = format.format(Latitude);
    private double Longitude = 0;
    @Element(required = false)
    private String longitude = format.format(Longitude);
    @Element(required = false)
    private String City = "";
    @Element(required = false)
    private String State = "";
    @Element(required = false)
    private String Country = "";
    @Element(required = false)
    private String BusinessName = "";
    @Element(required = false)
    private String BusinessDetails = "";
    @Element(required = false)
    private String PhotoType = "";
    @Element(required = false)
    private String PhotoContent = "";
    @Element(required = false)
    private String Tags = "";
    @Element(required = false)
    private String Category = "";
    @Element(required = false)
    private int Styles = 0;
    @Element(required = false)
    private String VendorId = "";
    @Element(required = false)
    private int DealSource = 0;

    public ProposedDeal(
            String title,
            Date expirationDate,
            String addedBy,
            String businessName,
            String country,
            String city,
            String state,
            String streetAddress) {
        Title = title;
        setExpirationDate(expirationDate);
        AddedBy = addedBy;
        BusinessName = businessName;
        Country = country;
        City = city;
        State = state;
        StreetAddress = streetAddress;
    }

    /**
     * @return the ID
     */
    public String getID() {
        return ID;
    }

    /**
     * @param ID the ID to set
     */
    public void setID(String ID) {
        this.ID = ID;
    }

    /**
     * @return the Title
     */
    public String getTitle() {
        return Title;
    }

    /**
     * @param Title the Title to set
     */
    public void setTitle(String Title) {
        this.Title = Title;
    }

    /**
     * @return the Details
     */
    public String getDetails() {
        return Details;
    }

    /**
     * @param Details the Details to set
     */
    public void setDetails(String Details) {
        this.Details = Details;
    }

    /**
     * @return the Restrictions
     */
    public String getRestrictions() {
        return Restrictions;
    }

    /**
     * @param Restrictions the Restrictions to set
     */
    public void setRestrictions(String Restrictions) {
        this.Restrictions = Restrictions;
    }

    /**
     * @return the EffectiveDate
     */
    public String getEffectiveDate() {
        return sdf.format(EffectiveDate);
    }

    /**
     * @param EffectiveDate the EffectiveDate to set
     */
    public void setEffectiveDate(Date EffectiveDate) {
        this.EffectiveDate = EffectiveDate;
        this.effectiveDate = sdf.format(EffectiveDate);
    }

    /**
     * @return the ExpirationDate
     */
    public String getExpirationDate() {
        return sdf.format(ExpirationDate);
    }

    /**
     * @param ExpirationDate the ExpirationDate to set
     */
    public void setExpirationDate(Date ExpirationDate) {
        this.ExpirationDate = ExpirationDate;
        this.expirationDate = sdf.format(ExpirationDate);
    }

    /**
     * @return the Url
     */
    public String getUrl() {
        return Url;
    }

    /**
     * @param Url the Url to set
     */
    public void setUrl(String Url) {
        this.Url = Url;
    }

    /**
     * @return the IsExclusive
     */
    public int getIsExclusive() {
        return IsExclusive;
    }

    /**
     * @param IsExclusive the IsExclusive to set
     */
    public void setIsExclusive(int IsExclusive) {
        this.IsExclusive = IsExclusive;
    }

    /**
     * @return the FirstName
     */
    public String getFirstName() {
        return FirstName;
    }

    /**
     * @param FirstName the FirstName to set
     */
    public void setFirstName(String FirstName) {
        this.FirstName = FirstName;
    }

    /**
     * @return the LastName
     */
    public String getLastName() {
        return LastName;
    }

    /**
     * @param LastName the LastName to set
     */
    public void setLastName(String LastName) {
        this.LastName = LastName;
    }

    /**
     * @return the IsOwner
     */
    public boolean isIsOwner() {
        return IsOwner;
    }

    /**
     * @param IsOwner the IsOwner to set
     */
    public void setIsOwner(boolean IsOwner) {
        this.IsOwner = IsOwner;
    }

    /**
     * @return the AddedBy
     */
    public String getAddedBy() {
        return AddedBy;
    }

    /**
     * @param AddedBy the AddedBy to set
     */
    public void setAddedBy(String AddedBy) {
        this.AddedBy = AddedBy;
    }

    /**
     * @return the SocialNetworkID
     */
    public String getSocialNetworkID() {
        return SocialNetworkID;
    }

    /**
     * @param SocialNetworkID the SocialNetworkID to set
     */
    public void setSocialNetworkID(String SocialNetworkID) {
        this.SocialNetworkID = SocialNetworkID;
    }

    /**
     * @return the DailDealsEmailOK
     */
    public boolean isDailDealsEmailOK() {
        return DailDealsEmailOK;
    }

    /**
     * @return the StreetAddress
     */
    public String getStreetAddress() {
        return StreetAddress;
    }

    /**
     * @param StreetAddress the StreetAddress to set
     */
    public void setStreetAddress(String StreetAddress) {
        this.StreetAddress = StreetAddress;
    }

    /**
     * @return the Latitude
     */
    public String getLatitude() {
        return format.format(Latitude);
    }

    /**
     * @param Latitude the Latitude to set
     */
    public void setLatitude(double Latitude) {
        this.Latitude = Latitude;
        this.latitude = format.format(Latitude);
    }

    /**
     * @return the Longitude
     */
    public String getLongitude() {
        return format.format(Longitude);
    }

    /**
     * @param Longitude the Longitude to set
     */
    public void setLongitude(double Longitude) {
        this.Longitude = Longitude;
        this.longitude = format.format(Longitude);
    }

    /**
     * @return the City
     */
    public String getCity() {
        return City;
    }

    /**
     * @param City the City to set
     */
    public void setCity(String City) {
        this.City = City;
    }

    /**
     * @return the State
     */
    public String getState() {
        return State;
    }

    /**
     * @param State the State to set
     */
    public void setState(String State) {
        this.State = State;
    }

    /**
     * @return the Country
     */
    public String getCountry() {
        return Country;
    }

    /**
     * @param Country the Country to set
     */
    public void setCountry(String Country) {
        this.Country = Country;
    }

    /**
     * @return the BusinessName
     */
    public String getBusinessName() {
        return BusinessName;
    }

    /**
     * @param BusinessName the BusinessName to set
     */
    public void setBusinessName(String BusinessName) {
        this.BusinessName = BusinessName;
    }

    /**
     * @return the BusinessDetails
     */
    public String getBusinessDetails() {
        return BusinessDetails;
    }

    /**
     * @param BusinessDetails the BusinessDetails to set
     */
    public void setBusinessDetails(String BusinessDetails) {
        this.BusinessDetails = BusinessDetails;
    }

    /**
     * @return the PhotoType
     */
    public String getPhotoType() {
        return PhotoType;
    }

    /**
     * @param PhotoType the PhotoType to set
     */
    public void setPhotoType(String PhotoType) {
        this.PhotoType = PhotoType;
    }

    /**
     * @return the PhotoContent
     */
    public String getPhotoContent() {
        return PhotoContent;
    }

    /**
     * @param PhotoContent the PhotoContent to set
     */
    public void setPhotoContent(String PhotoContent) {
        this.PhotoContent = PhotoContent;
    }

    /**
     * @return the Tags
     */
    public String getTags() {
        return Tags;
    }

    /**
     * @param Tags the Tags to set
     */
    public void setTags(String Tags) {
        this.Tags = Tags;
    }

    /**
     * @return the Category
     */
    public String getCategory() {
        return Category;
    }

    /**
     * @param Category the Category to set
     */
    public void setCategory(String Category) {
        this.Category = Category;
    }

    /**
     * @return the Styles
     */
    public int getStyles() {
        return Styles;
    }

    /**
     * @param Styles the Styles to set
     */
    public void setStyles(int Styles) {
        this.Styles = Styles;
    }

    /**
     * @return the VendorId
     */
    public String getVendorId() {
        return VendorId;
    }

    /**
     * @return the DealSource
     */
    public int getDealSource() {
        return DealSource;
    }
}
